//
//  KLSGAlbumCell.m
//  KaoLaShiGuangFM
//
//  Created by lanou3g on 15/10/29.
//  Copyright © 2015年 com.lanou3g. All rights reserved.
//

#import "KLSGAlbumCell.h"

@implementation KLSGAlbumCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addSubviews];
    }
    return self;
}

- (void)addSubviews
{
    self.coverSmallImage = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 60, 60)];
//    self.coverSmallImage.backgroundColor = [UIColor redColor];
    [self addSubview:self.coverSmallImage];
    
    self.titleLable = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.coverSmallImage.frame) + 10, 5, kScreenWidth / 2, 40)];
//    self.titleLable.backgroundColor= [UIColor greenColor];
    self.titleLable.numberOfLines = 0;
    self.titleLable.font = [UIFont systemFontOfSize:16];
    [self addSubview:self.titleLable];
    
    self.updataAtLable = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.coverSmallImage.frame) +10, CGRectGetMaxY(self.titleLable.frame) - 10, kScreenWidth / 2, 30)];
//    self.updataAtLable.backgroundColor = [UIColor yellowColor];
    self.updataAtLable.font = [UIFont systemFontOfSize:13];
    self.updataAtLable.alpha = kAlpha;
    [self addSubview:self.updataAtLable];
    
    self.playTimesImage = [[UIImageView alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.coverSmallImage.frame) + 10, CGRectGetMaxY(self.updataAtLable.frame), 10, 10)];
    self.playTimesImage.image = [UIImage imageNamed:@"live_play_num"];
    [self addSubview:self.playTimesImage];
    
    self.playTimesLable = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.playTimesImage.frame), CGRectGetMaxY(self.updataAtLable.frame) - 10, 70, 25)];
    self.playTimesLable.alpha = kAlpha;
//    self.playTimesLable.backgroundColor = [UIColor greenColor];
    self.playTimesLable.font = [UIFont systemFontOfSize:13];
    [self addSubview:self.playTimesLable];
    
    self.tracksImage = [[UIImageView alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.playTimesLable.frame) + 10, CGRectGetMaxY(self.updataAtLable.frame), 15, 15)];
    self.tracksImage.image = [UIImage imageNamed:@"album_collect_count"];
    [self addSubview:self.tracksImage];
    
    self.tracksLable = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.tracksImage.frame), CGRectGetMaxY(self.updataAtLable.frame) - 10, 50, 25)];
//    self.tracksLable.backgroundColor = [UIColor greenColor];
    self.tracksLable.alpha = kAlpha;
    self.tracksLable.font = [UIFont systemFontOfSize:13];
    [self addSubview:self.tracksLable];
    
    self.collectButton = [[KLSGCollectButton alloc] initWithFrame:CGRectMake(kScreenWidth - 60, 30, 40, 40)];
    self.collectButton.pictureImage.image = [UIImage imageNamed:@"btn_collect"];
    self.collectButton.lable.text = @"收藏";
    self.collectButton.lable.textColor = [UIColor orangeColor];
    [self addSubview:self.collectButton];
    
    UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.coverSmallImage.frame) + 10, 79, kScreenWidth - 80, 1)];
    lineView.backgroundColor = [UIColor lightGrayColor];
    [self.contentView addSubview:lineView];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
